<template>
  <h1>EL-单选组件</h1>
  <el-radio-group v-model="gender">
    <el-radio label="男" value="1"></el-radio>
    <el-radio label="女" value="0"></el-radio>
  </el-radio-group>
  <h4>您选择的值为：{{gender}}</h4>
  <el-radio-group v-model="edu">
    <el-radio-button label="本科" value="bk"></el-radio-button>
    <el-radio-button label="大专" value="dz"></el-radio-button>
    <el-radio-button label="高中" value="gz"></el-radio-button>
    <el-radio-button label="初中" value="cj"></el-radio-button>
  </el-radio-group>
  <h4>您选择的值为：{{edu}}</h4>
  <el-radio-group v-model="pri">
    <el-radio-button v-for="a in arr" :label="a.title" :value="a.price"></el-radio-button>
  </el-radio-group>
  <h4>您选择的值为：{{pri}}</h4>
</template>

<script setup>
import {ref} from "vue";

const gender = ref('');
const edu = ref('');
const arr = ref([
  {title:"五粮液",price:100},
  {title:"茅台",price:200},
  {title:"酒鬼酒",price:300},
  {title:"泸州老窖",price:400}
]);
const pri = ref('');
</script>


<style scoped>

</style>
